<?php
	$groupName=$_POST['groupName'];
	$cateID=$_POST['cateID'];
	
	$target="../user/upload/groupCate/";
	$link=$target.$_FILES['groupImage']['name'];
	move_uploaded_file($_FILES['groupImage']['tmp_name'],$link);
	
	$query="INSERT INTO groupcategories(cateID,groupName,groupImage) VALUES ('$cateID','$groupName','$link')";
	mysql_query($query);
	echo "Thêm nhóm sản phẩm thành công.";
	echo "<script>window.location='index.php?admin=productAdmin&do=listgroup&id=$cateID'</script>";
?>	